using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace UTLCOMMAND
{
    public class CValidator
    {
        public CValidator()
        { 
        }
        public static bool IsInValidEmail(string strEmailAddress)
        {
            string pattern = @"^[a-z][a-z|0-9|]*([_][a-z|0-9]+)*([.][a-z|0-9]+([_][a-z|0-9]+)*)?@[a-z][a-z|0-9|]*\.([a-z][a-z|0-9]*(\.[a-z][a-z|0-9]*)?)$";
            System.Text.RegularExpressions.Match match = Regex.Match(strEmailAddress, pattern, RegexOptions.IgnoreCase);
            if (match.Success)
                return true;//Email valid
            else
                return false;//Email not valid

        }
    }
}
